<div class="content__title">
    <h1>
        MySQL 操作语句
    </h1>
</div>
<nz-card>
    <ng-template #body>
        <form nz-form>
            <div nz-row nz-form-item [nzGutter]="16" class="mb0">
                <div nz-form-label nz-col [nzSm]="2">
                    <label>日期</label>
                </div>
                <div nz-form-control nz-col [nzSm]="8">
                    <div nz-row>
                        <div nz-form-control nz-col [nzSpan]="11">
                            <nz-datepicker [(ngModel)]="args.b_tm" name="b_tm" [nzPlaceHolder]="'开始时间'"></nz-datepicker>
                        </div>
                        <div nz-col [nzSpan]="1">
                            <p nz-form-split>-</p>
                        </div>
                        <div nz-form-control nz-col [nzSpan]="11">
                            <nz-datepicker [(ngModel)]="args.e_tm" name="e_tm" [nzPlaceHolder]="'结束时间'"></nz-datepicker>
                        </div>
                    </div>
                </div>
                <div nz-col [nzSm]="5" [nzOffset]="2">
                    <button nz-button [nzType]="'primary'" (click)="load(1)" [nzLoading]="loading">搜索</button>
                    <button nz-button (click)="clear()" [disabled]="loading">重置</button>
                </div>
            </div>
        </form>
    </ng-template>
</nz-card>
<div nz-row [nzGutter]="16">
    <div nz-col [nzMd]="24">
        <nz-card>
            <ng-template #body>
                <nz-table #nzTable
                    [nzAjaxData]="list"
                    [nzShowSizeChanger]="true"
                    [nzLoading]="loading"
                    [nzTotal]="total"
                    [(nzPageIndex)]="pi"
                    (nzPageIndexChange)="load()"
                    [(nzPageSize)]="ps"
                    (nzPageSizeChange)="load()">
                    <tbody nz-tbody>
                        <tr nz-tbody-tr *ngFor="let data of nzTable.data">
                            <td class="nohaver" nz-td>
                                <div class="head">
                                   Date: {{data.Time * 1000 | _date: 'YYYY年MM月DD日 HH:mm:ss'}} &nbsp;{{data.From}}
                                </div>
                                <div class="sql-content">
                                    <prism-block [code]="data.Query" [language]="'sql'"></prism-block>
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </nz-table>
            </ng-template>
        </nz-card>
    </div>
</div>
